#ifndef TIEC_INTERNAL_COMPONENT_H
#define TIEC_INTERNAL_COMPONENT_H

#include "component.h"

namespace NS_TIEC {
  class InternalMessages : public Messages {
  public:
    InternalMessages(PTR<Context> context);

    void info(const String& message) override;

    void warning(const String& message) override;

    void error(const String& message) override;

    void diagnostic(Diagnostic& diagnostic) override;

    UInt32 errorCount() override;

    UInt32 warningCount() override;

  private:
    UInt32 error_count_{0};
    UInt32 warning_count_{0};
    DiagnosticHandler* diagnostic_handler_;
    LogLevel log_level_ {LogLevel::kLevelDebug};
  };

  class InternalDiagnosticHandler : public DiagnosticHandler {
  public:
    void report(Diagnostic &diagnostic) override;
  };
}

#endif //TIEC_INTERNAL_COMPONENT_H
